//-----------------------------------------------------------------------------
// Bend2D - Physics Engine
// Roberto Bender <beto.bender@gmail.com>
// Description: 
// Date: 29/03/2010
//-----------------------------------------------------------------------------
#include "collidableform.h"
using namespace bend2d;

CollidableForm::CollidableForm() :
    m_GeometricForm(eNone),
    m_Error(0.01),
    m_Radius(0)
{
}

CollidableForm::CollidableForm(eColliableGeometricFormType geometricForm) :
    m_GeometricForm(geometricForm),
    m_Error(0.01),
    m_Radius(0)
{
}

CollidableForm::eColliableGeometricFormType CollidableForm::GetGeometricForm() const
{
    return m_GeometricForm;
}

void CollidableForm::SetGeometricForm(eColliableGeometricFormType form)
{
    m_GeometricForm = form;
}

void CollidableForm::SetError(double error)
{
    m_Error = error;
}

void CollidableForm::SetRadius(double radius)
{
    m_Radius = radius;
}

double CollidableForm::GetError() const
{
    return m_Error;
}

double CollidableForm::GetRadius() const
{
    return m_Radius;
}

const Line& CollidableForm::GetStaticLine() const
{
    return m_FallbackLine;
}

const Line CollidableForm::GetMovingLine() const
{
    return Line(GetInitialPosition(), GetFinishPosition());
}

const Point& CollidableForm::GetInitialPosition() const
{
    return m_FallbackPoint;
}

const Point& CollidableForm::GetFinishPosition() const
{
    return m_FallbackPoint;
}
